/** 本地存储-- 存 */
export const setToken = (data: string) => {
  localStorage.setItem("token", JSON.stringify(data));
};

export const setList = (data: string) => {
  localStorage.setItem("list", JSON.stringify(data));
};

/** 本地存储-- 取 */
export const getToken = () => {
  return JSON.parse(localStorage.getItem("token") as string);
};

export const getList = () => {
  return JSON.parse(localStorage.getItem("list") as string);
};

/** 本地存取-- 删 */
export const removeToken = () => {
  localStorage.clear();
};
